<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib prefix="frame" uri="http://www.framework.com/taglib"%>
<html>
<head>
	<title>公共平台</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- 样式文件的引入 -->
	<link href="${ctx}/commons/css/style.css" rel="stylesheet"
		  type="text/css" />
	<link rel="stylesheet" type="text/css"
		  href="${ctx}/commons/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css"
		  href="${ctx}/commons/themes/icon.css" />
	<link href="${ctx}/commons/js/uploadify/uploadify.css" rel="stylesheet"
		  type="text/css" />

	<!-- jqueryUI JS文件的引入 -->
	<script type="text/javascript"
			src="${ctx}/commons/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/jquery.easyui.min.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/easyui-extends-validate.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/uploadify/jquery.uploadify.min.js"></script>
	<!-- 开发使用的公用js方法 -->

	<!-- jqueryUI国际化 -->
	<script type="text/javascript"
			src="${ctx}/commons/js/easyui-lang-zh_CN.js"></script>
	<!-- 开发国际化的引用，主要完成后台信息在前台提示的国际化，一定要放在最后 -->
	<script type="text/javascript">
        var ctx = '${ctx}';
        var actionExt = "action";
        var i18n = new Object();
	</script>
	<script src="${ctx}/commons/js/i18n/message_zh_CN.js"
			type="text/javascript"></script>
</head>

<body >
<form name="addDataForm" id="addShopDataForm" action="${ctx}/business/shop/save">
	<input type="hidden" name="registerId" id="registerId" value="${register.id}"/>
	<input type="hidden" name="image01" id="image01" value="${register.image01}"/>
	<table class="infoTable">
		<tbody>
		<tr>
			<th colspan="4"><center>
				<strong>基本信息</strong>
			</center></th>
		</tr>

		<tr>

			<th align="right" width="10%">单位名称/姓名:</th>
			<td colspan="3">${register.loginName}</td>

		</tr>
		<tr>
			<th align="right" width="10%">办公电话:</th>
			<td>${register.tel}</td>
			<th align="right" width="10%">手机号码:</th>
			<td>${register.mobile}</td>
		</tr>
		<tr>
			<th align="right" width="10%">竞拍人类型:</th>
			<td>${register.category==1?"自然人":"企业"}</td>
			<th align="right" width="10%">Email:</th>
			<td>${register.email}</td>
		</tr>

		<tr>
			<th align="right" width="10%">开户行:</th>
			<td>${register.bank}</td>
			<th align="right" width="10%">账户:</th>
			<td>${register.account}</td>
		</tr>
		<tr>
			<th align="right" width="10%">邮编:</th>
			<td>${register.post}</td>
			<th align="right" width="10%">地址:</th>
			<td>${register.address}</td>
		</tr>

		<tr>

			<th align="right" width="10%">自然人身份证号码/统一社会信用代码:</th>
			<td colspan="3">${register.societyCode}</td>
		</tr>
		<tr>
			<th colspan="4">
				<center>
					<strong>认证信息</strong>
				</center>
			</th>
		</tr>
		<tr>
			<th align="right" width="10%">身份证复印件/营业执照:</th>
			<c:if test="${empty register.image01}">
				<td colspan="3">无</td>
			</c:if>
			<c:if test="${not empty register.image01}">
				<td colspan="3"><a target="_blank" href="${ctx}/file_resource/image01/${register.image01}${image01.exeName}" class="easyui-linkbutton">图片浏览</a></td>
			</c:if>
		</tr>
		<tr>
			<th align="right" width="10%">注册承诺</th>
			<c:if test="${empty register.image02}">
				<td colspan="3">无</td>
			</c:if>
			<c:if test="${not empty register.image02}">
				<td colspan="3"><a target="_blank" href="${ctx}/file_resource/image02/${register.image02}${image02.exeName}" class="easyui-linkbutton">图片浏览</a></td>
			</c:if>
		</tr>

		<tr>
			<th colspan="4"><center>
				<strong>审核信息</strong>
			</center></th>
		</tr>
		<tr>
			<th align="right" width="10%">审核结果:</th>
			<c:if test="${register.flag==0}">
				<td><font color="green">未审核</font></td>
			</c:if>
			<c:if test="${register.flag==1}">
				<td><font color="blue">已审核</font></td>
			</c:if>
			<c:if test="${register.flag==2}">
				<td><font color="red">审核未通过</font></td>
			</c:if>
			<th align="right">原因:</th>
			<c:if test="${ empty register.reason}">
				<td>无</td>
			</c:if>
			<c:if test="${not empty register.reason}">
				<td><font color="red">${register.reason}</font></td>
			</c:if>
		</tr>
		<tr>
			<th colspan="4">
				<center>
					<strong>禁止竞拍信息</strong>
				</center>
			</th>
		</tr>
		<tr>
			<th align="right">禁拍开始日期:</th>
			<c:if test="${empty register.forbidStartDate}">
				<td>无</td>
			</c:if>
			<c:if test="${not empty register.forbidStartDate}">
				<td><font color="red"><fmt:formatDate value="${register.forbidStartDate}" pattern="yyy年MM月dd日 " /></font></td>
			</c:if>
			<th align="right" >禁拍结束日期:</th>
			<c:if test="${empty register.forbidEndDate}">
				<td>无</td>
			</c:if>
			<c:if test="${not empty register.forbidEndDate}">
				<td><font color="red"><fmt:formatDate value="${register.forbidEndDate}" pattern="yyy年MM月dd日 " /></font></td>
			</c:if>
		</tr>
		<tr>
			<th align="right" >禁止竞拍原因:</th>
			<c:if test="${empty register.forbidReason}">
				<td>无</td>
			</c:if>
			<c:if test="${ not empty register.forbidReason}">
				<td><font color="red">${register.forbidReason}</font></td>
			</c:if>
			<th align="right" >操作人:</th>
			<c:if test="${empty register.operatorName}">
				<td>无</td>
			</c:if>
			<c:if test="${ not empty register.operatorName}">
				<td><font color="red">${register.operatorName}</font></td>
			</c:if>
		</tr>



		</tbody>
	</table>
</form>

<script type="text/javascript">
    $(function(){
        if("${register.loginTypePWD}"=="1"){
            $("#loginTypePWD").attr("checked",true);
        }

        if("${register.loginTypeCA}"=="1"){
            $("#loginTypeCA").attr("checked",true);
        }
    });


    $("#btnSubmit").click(function() {
        var val = $('input:radio[name="flag"]:checked').val();
        if (val == null) {
            $.messager.alert('提示', '请确认审核是否通过！','info');
            return
        }else{
            audit();

        }
    });

    function audit(){
        var registerId=$('#registerId').val();
        var flag = $('input:radio[name="flag"]:checked').val();
        var reason =$('#reason').val();
        $.ajax({
            data: {registerId:registerId,
                flag:flag,
                reason:reason
            },
            url:'${ctx}/template/register/audit',
            type:'post',
            datatype:'json',
            success:function(data){
                window.location ="${ctx}/register/register-list.jsp";
            }
        });
    }
</script>
</body>
</html>